<h3>Danh sách đơn hàng</h3>
<table id='tableCart'>
<col width='10%'/>
<col width='25%'/>
<col width='10%'/>
<col width='15%'/>
<col width='10%'/>
<col width='10%'/>
<col width='10%'/>
<col width='10%'/>
<tr>
	<th>STT</th>
	<th>Tên KH</th>	
	<th>Thanh toán</th>
	<th>Chuyển hàng</th>	
	<th>Tổng cộng</th>	
	<th>Tình trạng</th>
	<th>Ngày đặt hàng</th>
	<th></th>
</tr>
<?php if(!empty($rs)):?>
<?php
$i = 0;
foreach($rs as $item):
$i++;
?>
<tr>
	<td><?php echo $i?></td>
	<td><?php echo $this->Html->link(h($item['Customer']['name']),array('action'=>'detail','controller'=>'orders',$item['Order']['id']))?></td>
	<td><?php echo h($item['PaymentType']['name'])?></td>
	<td><?php echo h($item['ShippingType']['name'])?></td>
	<td><?php echo h($item['Order']['total'])?></td>
	<td><?php echo h($item['OrderStatus']['name'])?></td>
	<td><?php echo h($item['Order']['created'])?></td>
	<td>
	<?php echo $this->Html->link('Xóa',array('action'=>'delete','controller'=>'orders',h($item['Order']['id'])),null,'Bạn thật sự muốn xóa?')?>
	<?php //echo $this->Html->link('Sửa',array('action'=>'edit','controller'=>'orders',h($item['Order']['id'])))?>	
	</td>
</tr>
<?php endforeach;?>
<?php else:?>
<tr><td colspan='6'>Không tìm thấy dữ liệu</td></tr>
<?php endif;?>
</table>
<?php echo $this->element('paging')?>